$(document).ready(function() {
    jQuery(document).pngFix();
     if(!jQuery.browser.msie){
	jQuery("#nav ul ").css({opacity:"0.85"});
	}
    jQuery("#nav ul").css({display: "none"});
	jQuery("#nav > li > ul").parent().find("a:first").append("<span class='sub_list'>&nbsp;</span>");
	jQuery("#nav ul li > ul").parent().find("a:first").append("<span class='sub_sub_list'>&nbsp;</span>");
    jQuery("#nav li").hover(function(){
        jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
        },function(){
        jQuery(this).find('ul:first').css({visibility: "hidden"});
        });

    $('.exif').hover(
      function() {
	$('.phexif').slideDown("slow");
      }, function() {
	$('.phexif').slideUp("slow");
      });
     $('.opis').hover(
      function() {
	$('.phinfo').slideDown("slow");
      }, function(){
	$('.phinfo').slideUp("slow");
      });
      
$('a[href^="http://"]').filter(function() {
         return this.hostname && this.hostname !== location.hostname;
        }).not(':has(img)').addClass('external');

    $('#comments .entry').hover(function(){
	$(this).addClass('hover');
    }, function(){
	$(this).removeClass('hover');});
   $(".phexif").css({opacity:"0.8"});
    $(".phinfo").css({opacity:"0.8"});

    $(".entry p a img").css({opacity:"0.65"});
    $(".entry p a img").hover(function(){
    $(this).animate({opacity:"1"},"slow");},
    function(){
     $(this).animate({opacity:"0.65"},"slow");
    })

    $(".lastphoto img").css({opacity:"0.6"});
    $(".lastphoto img").hover(function(){
    $(this).animate({opacity:"1"},"slow");},
    function(){
    $(this).animate({opacity:"0.75"},"slow");
    });
    $(".catimg img").css({opacity:"0.65"});
    $('.photocat').hover(function(){
    $(this).children('div.catimg').children('a').children('img').animate({opacity:"1"},"slow");
    },function(){
    $(this).children('div.catimg').children('a').children('img').animate({opacity:"0.65"},"slow");
    });
});

jQuery.preloadImages = function()
    {
	for(var i = 0; i<arguments.length; i++)
	{
	    jQuery("<img>").attr("src", arguments[i]);
	}
    }
    
